<?php
/**
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled with this
 * package in the file LICENSE.txt. It is also available through the
 * world-wide-web at this URL: http://dragonjsonserver.de/license. If you did
 * not receive a copy of the license and are unable to obtain it through the
 * world-wide-web, please send an email to license@dragonjsonserver.de. So we
 * can send you a copy immediately.
 *
 * @copyright Copyright (c) 2012 DragonProjects (http://dragonprojects.de)
 * @license http://framework.zend.com/license/new-bsd New BSD License
 * @author Christoph Herrmann <developer@dragonjsonserver.de>
 */
?>
<div class="row-fluid">
    <div class="span3">
        <div class="well sidebar-nav">
            <ul class="nav nav-list">
                <?php
                foreach ($this->subnavigation as $key => $value) {
                    if (is_int($key)) {
                        echo '<li class="nav-header">' . $this->escape($value) . '</li>';
                    } else {
                        echo
                              '<li' . ($this->actionname == $key ? ' class="active"' : '') . '>'
                            . '   <a href="' . $this->url(array('controller' => $this->controllername, 'action' => $key), null, true) . '">' . $this->escape($value) . '   </a>'
                            . '</li>';
                    }
                }
                ?>
            </ul>
        </div>
    </div>
    <div class="span9">
        <?php
        if (isset($this->subnavigation->{$this->actionname})) {
            echo
                  '<h2>' . $this->subnavigation->{$this->actionname} . '</h2>'
                . $this->partial($this->subnavigationdirectory . '/partial/' . str_replace('_', '/', $this->actionname) . '.phtml');
        }
        ?>
    </div>
</div>
